package example.data;

/**
 * Created by lenovo on 2016/11/7 0007.
 * do...while求和数字[0,100]
 */
public class Sum {
    public static void main(String[] args) {
        int limit = 100;
        int sum = 0;
        int i = 1;
        do {
            sum += i;
            i++;
        } while (i <= limit);
        System.out.println("sum = " + sum);
    }
}
